<h1>Listing enrollments</h1>

<table>
  <tr>
    <th>Actived</th>
    <th>User</th>
    <th>Course</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @enrollments.each do |enrollment| %>
  <tr>
    <td><%= enrollment.actived %></td>
    <td><%= enrollment.user.name %></td>
    <td><%= enrollment.course.name %></td>
    <td><%= link_to 'Show', enrollment %></td>
    <td><%= link_to 'Edit', edit_enrollment_path(enrollment) %></td>
    <td><%= link_to 'Destroy', enrollment, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Enrollment', new_enrollment_path %>
